home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nct06015.geo / 00025.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  5.9 KB  |  237 lines

  1. on startMovie
  2.   Set_CDcounter(3)
  3.   initLesson()
  4.   CheckForTagWd()
  5. end
  6.  
  7. on HideLastStep
  8.   unLoadCast()
  9.   RestoreHilites()
  10. end
  11.  
  12. on TheinitCursor
  13.   initCursorCastNum()
  14.   initCursorList(1)
  15.   set CursorCastNum to getCursor(2)
  16.   cursor([CursorCastNum, CursorCastNum + 1])
  17. end
  18.  
  19. on checkScreenStatus
  20.   CheckRollOver()
  21.   CheckSnakeStatus()
  22.   go(the frame)
  23. end
  24.  
  25. on BlinkNext
  26.   if (the timer > getTimer()) and not soundBusy(2) then
  27.     startTimer()
  28.     if the name of cast the castNum of sprite get_NEXTSprite() = "NEXT" then
  29.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT_E"
  30.     else
  31.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT"
  32.     end if
  33.   end if
  34. end
  35.  
  36. on GoNext
  37.   if not get_Disabled() then
  38.     sound stop 2
  39.     if Get_NEXT() = 1 then
  40.       go("t1")
  41.     else
  42.       if Get_NEXT() = 2 then
  43.         go("t2")
  44.       else
  45.         if Get_NEXT() = 3 then
  46.           go("t3")
  47.         else
  48.           if Get_NEXT() = 4 then
  49.             unLoadCast(103, 150)
  50.             go("t4")
  51.           else
  52.             if Get_NEXT() = 5 then
  53.               go("t6")
  54.             else
  55.               if Get_NEXT() = 6 then
  56.                 go("t6_blink")
  57.               else
  58.                 if Get_NEXT() = 7 then
  59.                   go("t18")
  60.                 else
  61.                   if Get_NEXT() = 8 then
  62.                     go("t7")
  63.                   else
  64.                     if Get_NEXT() = 9 then
  65.                       go("t8")
  66.                     else
  67.                       if Get_NEXT() = 10 then
  68.                         go("t9")
  69.                       else
  70.                         if Get_NEXT() = 11 then
  71.                           go("t11")
  72.                         else
  73.                           if Get_NEXT() = 12 then
  74.                             go("t12")
  75.                           else
  76.                             if Get_NEXT() = 13 then
  77.                               go("t13")
  78.                             else
  79.                               if Get_NEXT() = 14 then
  80.                                 go("t15")
  81.                               else
  82.                                 if Get_NEXT() = 15 then
  83.                                   go("t16")
  84.                                 else
  85.                                   if Get_NEXT() = 16 then
  86.                                     go("t17")
  87.                                   else
  88.                                     if Get_NEXT() = 17 then
  89.                                       GoNextMovie()
  90.                                     end if
  91.                                   end if
  92.                                 end if
  93.                               end if
  94.                             end if
  95.                           end if
  96.                         end if
  97.                       end if
  98.                     end if
  99.                   end if
  100.                 end if
  101.               end if
  102.             end if
  103.           end if
  104.         end if
  105.       end if
  106.     end if
  107.     Set_NEXT(Get_NEXT() + 1)
  108.   end if
  109. end
  110.  
  111. on stopMovie
  112.   sound stop 1
  113.   unLoad()
  114.   setEmptyCursor()
  115. end
  116.  
  117. on GoNextMovie
  118.   PlaySound("GOSOUND.SO1")
  119.   SaveHilite()
  120.   Add_CDcounter(1)
  121.   set cdNum to Get_CDcounter()
  122.   set movieName to item cdNum of Get_CurrentSnakeScreens()
  123.   go("INIT" & Get_ScreenSubject(), movieName & ".GEO")
  124. end
  125.  
  126. on visLamp bool
  127.   set the visible of sprite 21 to bool
  128.   set the visible of sprite 22 to bool
  129. end
  130.  
  131. on InitLamp bool
  132.   visLamp(0)
  133.   UpdateCursors(20, 3)
  134.   UpdateCursors(22, 0)
  135.   set the castNum of sprite 20 to the number of cast "lamp_Off"
  136. end
  137.  
  138. on unSetMouseEvents
  139.   global puppetList
  140.   set puppetList to []
  141.   repeat with i = 1 to 48
  142.     add(puppetList, the puppet of sprite i)
  143.     if not (the puppet of sprite i) then
  144.       set the puppet of sprite i to 1
  145.     end if
  146.   end repeat
  147.   play frame "outLamp"
  148. end
  149.  
  150. on setMouseEvents
  151.   global puppetList
  152.   set the mouseDownScript to EMPTY
  153.   set the mouseUpScript to EMPTY
  154.   set the keyDownScript to EMPTY
  155.   set the keyUpScript to EMPTY
  156.   repeat with i = 1 to 48
  157.     if getAt(puppetList, i) = 0 then
  158.       set the puppet of sprite i to 0
  159.     end if
  160.   end repeat
  161.   play done
  162. end
  163.  
  164. on dont
  165.   dontPassEvent()
  166. end
  167.  
  168. on HandleLamp
  169.   sound stop 2
  170.   if the name of cast the castNum of sprite 20 = "lamp_On" then
  171.     set the castNum of sprite 20 to the number of cast "lamp_Off"
  172.     set the visible of sprite 21 to 0
  173.     set the visible of sprite 22 to 0
  174.     UpdateCursors(22, 0)
  175.     set the castNum of sprite 34 to the number of cast "EXITLAMP"
  176.     updateStage()
  177.     unSetMouseEvents()
  178.   else
  179.     set the castNum of sprite 20 to the number of cast "lamp_On"
  180.     UpdateCursors(22, 3)
  181.     set the visible of sprite 21 to 1
  182.     set the visible of sprite 22 to 1
  183.     updateStage()
  184.     PlaySound("NCT06015.T01")
  185.     displayTip(22)
  186.   end if
  187.   updateStage()
  188. end
  189.  
  190. on displayTip theExitBtnSp
  191.   global exitTheLoop
  192.   set exitTheLoop to 0
  193.   set the mouseDownScript to "dont"
  194.   set the mouseUpScript to "dont"
  195.   set the keyDownScript to "dont"
  196.   set the keyUpScript to "dont"
  197.   set the exitLock to 0
  198.   repeat while not exitTheLoop
  199.     if the mouseCast = the number of cast "EXITLAMP" then
  200.       set the cursor of sprite 48 to [404, 405]
  201.     else
  202.       set the cursor of sprite 48 to [400, 401]
  203.     end if
  204.     if the mouseDown and (the mouseCast = the number of cast "EXITLAMP") then
  205.       switchExitLampButt(theExitBtnSp, "EXITLAMP_D")
  206.     end if
  207.   end repeat
  208.   set the exitLock to 1
  209.   set the cursor of sprite 48 to 0
  210.   HandleLamp()
  211. end
  212.  
  213. on switchExitLampButt spriteNum, castDown
  214.   global exitTheLoop
  215.   set flag to 0
  216.   set SaveCast to the castNum of sprite spriteNum
  217.   set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  218.   repeat while the mouseDown
  219.     set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  220.   end repeat
  221.   if flag = 1 then
  222.     set exitTheLoop to 1
  223.   end if
  224. end
  225.  
  226. on swapExitLampCast spriteNum, SaveCast, castDown
  227.   if rollOver(spriteNum) then
  228.     set the castNum of sprite spriteNum to the number of cast castDown
  229.     updateStage()
  230.     return 1
  231.   else
  232.     set the castNum of sprite spriteNum to the number of cast SaveCast
  233.     updateStage()
  234.     return 0
  235.   end if
  236. end
  237.